# coding=utf-8

url = "http://i1.hdslb.com/bfs/archive/763293ce06bf1e684ef0ea3da43ae5008d8564b8.jpg"


def test1():
    from urllib.request import urlretrieve
    
    urlretrieve(url, "test1.jpg")
    

def test2():
    from urllib.request import urlopen
    
    f = urlopen(url)
    
    with open("test2.jpg", "wb") as out:
        out.write(f.read())


def test3():
    from requests import get
     
    r = get(url)
    with open("test3.jpg", "wb") as out:
        out.write(r.content)  


test1()
test2()
test3()
